package com.wn.class30.entity;

import java.io.Serializable;

/**
 * myorder_detail
 * @author 
 */
public class MyorderDetail implements Serializable {
    /**
     * 订单详情ID
     */
    private Integer odid;

    /**
     * 商品编号
     */
    private Integer productId;

    /**
     * 购买数量
     */
    private Integer productNum;

    /**
     * 商品单价
     */
    private Double productPrice;

    /**
     * 商品总价
     */
    private Double totalPrice;

    /**
     * 订单id
     */
    private Integer myorderId;

    /**
     * 评论id
     */
    private Integer commentId;

    /**
     * 积分
     */
    private String odIntegral;

    private Comment comment;

    private Product product;

    public Comment getComment() {
        return comment;
    }

    public void setComment(Comment comment) {
        this.comment = comment;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    private static final long serialVersionUID = 1L;

    public Integer getOdid() {
        return odid;
    }

    public void setOdid(Integer odid) {
        this.odid = odid;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public Integer getProductNum() {
        return productNum;
    }

    public void setProductNum(Integer productNum) {
        this.productNum = productNum;
    }

    public Double getProductPrice() {
        return productPrice;
    }

    public void setProductPrice(Double productPrice) {
        this.productPrice = productPrice;
    }

    public Double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(Double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public Integer getMyorderId() {
        return myorderId;
    }

    public void setMyorderId(Integer myorderId) {
        this.myorderId = myorderId;
    }

    public Integer getCommentId() {
        return commentId;
    }

    public void setCommentId(Integer commentId) {
        this.commentId = commentId;
    }

    public String getOdIntegral() {
        return odIntegral;
    }

    public void setOdIntegral(String odIntegral) {
        this.odIntegral = odIntegral;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MyorderDetail other = (MyorderDetail) that;
        return (this.getOdid() == null ? other.getOdid() == null : this.getOdid().equals(other.getOdid()))
            && (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
            && (this.getProductNum() == null ? other.getProductNum() == null : this.getProductNum().equals(other.getProductNum()))
            && (this.getProductPrice() == null ? other.getProductPrice() == null : this.getProductPrice().equals(other.getProductPrice()))
            && (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice()))
            && (this.getMyorderId() == null ? other.getMyorderId() == null : this.getMyorderId().equals(other.getMyorderId()))
            && (this.getCommentId() == null ? other.getCommentId() == null : this.getCommentId().equals(other.getCommentId()))
            && (this.getOdIntegral() == null ? other.getOdIntegral() == null : this.getOdIntegral().equals(other.getOdIntegral()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getOdid() == null) ? 0 : getOdid().hashCode());
        result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
        result = prime * result + ((getProductNum() == null) ? 0 : getProductNum().hashCode());
        result = prime * result + ((getProductPrice() == null) ? 0 : getProductPrice().hashCode());
        result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode());
        result = prime * result + ((getMyorderId() == null) ? 0 : getMyorderId().hashCode());
        result = prime * result + ((getCommentId() == null) ? 0 : getCommentId().hashCode());
        result = prime * result + ((getOdIntegral() == null) ? 0 : getOdIntegral().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", odid=").append(odid);
        sb.append(", productId=").append(productId);
        sb.append(", productNum=").append(productNum);
        sb.append(", productPrice=").append(productPrice);
        sb.append(", totalPrice=").append(totalPrice);
        sb.append(", myorderId=").append(myorderId);
        sb.append(", commentId=").append(commentId);
        sb.append(", odIntegral=").append(odIntegral);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}